<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common_include_for_server.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title>行业管理</title>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<%@ include file="/jsp/common/common_include_for_client.jsp"%>
		<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath() %>/js/dhtmlxTree/dhtmlxtree.css"></link>
		<script  src="<%=request.getContextPath() %>/js/dhtmlxTree/dhtmlxcommon.js"></script>
		<script  src="<%=request.getContextPath() %>/js/dhtmlxTree/dhtmlxtree.js"></script>
		<script type="text/javascript">
		<!--
		$(function(){
			$("input[name='industry.name']").focus();
			$(".dataTable tr:nth-child(n+2)").hover(function(){
				this.style.backgroundColor='#CCCCCC';
			},
			function(){
				this.style.backgroundColor='#FFFFFF';
			});
		});
		//-->
		</script>
		<style>
		<!--
		.tr_industry{height: 20px; font-size:14px; padding: 3px; font-weight: bold;}
		.tr_industry .industry_name{ padding-left: 3px;}
		.tr_sub_industry { height: 18px;}
		.tr_sub_industry .industry_name{ padding-left: 20px; padding-right: 10px; font-size:12px; white-space: nowrap;}
		.operation{  font-size:12px; padding: 3px; font-weight: normal; color: #cccccc;}
		-->
		</style>
	</head>

	<body>
	<form action="manage/industry!save.action" method="post">
		添加行业：
		<s:select name="industry.industry.industryId" list="industryList" headerKey="" headerValue="一级行业" listKey="industryId" listValue="name"></s:select>
		<input name="industry.name"/><input type="submit" value="提交"/>
	</form>
	<table border="1" width="100%" class="dataTable">
		<tr>
			<th></th>
			<th width="100px">名称</th>
			<th>操作</th>
		</tr>
		<s:iterator value="industryList" status="outerSts">
		<tr class="tr_industry">
			<td><s:property value="#outerSts.index+1"/></td>
			<td class="industry_name"><s:property value="name"/></td>
			<td>
				<span class="operation">|
					<a href="manage/industry!moveUp.action?industry.industryId=${industryId}">上移</a> |
					<a href="manage/industry!moveDown.action?industry.industryId=${industryId}">下移</a> |
					<a href="manage/industry!delete.action?industry.industryId=${industryId}">删除</a> |
				</span>
			</td>
		</tr>
		<s:iterator value="industries" status="innerSts">
			<tr class="tr_sub_industry">
				<td><s:property value="#outerSts.index+1"/>.<s:property value="#innerSts.index+1"/></td>
				<td class="industry_name"><s:property value="name"/></td>
				<td>
					<span class="operation">|
					<a href="manage/industry!moveUp.action?industry.industryId=${industryId}">上移</a> |
					<a href="manage/industry!moveDown.action?industry.industryId=${industryId}">下移</a> |
					<a href="manage/industry!delete.action?industry.industryId=${industryId}">删除</a> |
					</span>
				</td>
				
			</tr>
		</s:iterator>
		</s:iterator>
	</table>
	</body>
</html>
